New function space options for coordinate fields#179
New function space options for coordinate fields#179tommbendall wants to merge 40 commits intoMetOffice:mainfrom
Conversation
There was a problem hiding this comment.
As discussed, "cbl" and "rad_gas" lfric_atm idealised tests are erroneously having their initial wind set to 0 by this, because they use smp_init_wind=true with the wtheta co-ordinate. lfric_atm uses smp_init_wind=true, because using false results in a projection being done, which leads to noisy profiles - this is the only way to get exactly what is in the namelist. I can think of 3 possible options:
- change these tests back to using the wchi co-ordinate
- change these tests to use the pw_linear vertical profile, with just a single value specified to replace the current constant_uv values
- make the sample_initial_u kernel use da_at_w2 instead of chi
I have no strong preference which!
I've made the |
|
This will need a linked PR in JEDI. I will link to it once ready. |
There was a problem hiding this comment.
JEDI PRs now live at: https://github.com/JCSDA-internal/lfric-jedi/pull/1238 and https://github.com/MetOffice/jjtests/pull/159
I tested using a locally-updated copy of the branch, but the linked PR should still work when this branch is updated too.
PR Summary
Sci/Tech Reviewer: @thomasmelvin
Code Reviewer: @EdHone
This PR picks up on the new coordinate field namelist options from MetOffice/lfric_core#238, and sets some key apps to use the new Wtheta coordinate space.
A handful of science changes were necessary to get this to work -- these are detailed below. Otherwise, the vast majority of changes involve the addition of the new namelist options into all of the required files.
Please See
This branch is built on the changes in #277, and until that is merged the diff on this PR will also include the changes from that branch. I have created PRs in my own fork to show useful diffs for reviewing:
Linked-To
Blocked-By
This branch includes the changes from #277, which are necessary to be able to safely use a Wtheta space for the coordinate fields.
Blocks
The ultimate aim of this work is to facilitate moving to
coord_order=2to give a better representation of the orography.Details
Some science changes were necessary to allow the use of a Wtheta-like coordinate space:
chiis discontinuous, and modify the DoFs in place. I have rewritten this file to make a copy ofchibefore the coordinates are adjusted to account for orography, which allows them to work in the case of (partial) continuitycoordinate_basedoption for specifying LBCs assumes the coordinate values are in the corner of DoFs. To ensure this still works, I copy the coordinate fields intoWchiWchispace. To avoid issues, the kernel has been changed to avoid using the chi field, and instead uses the dA_at_w2 field (which will be valid for any coordinate options)Otherwise the changes involve picking up the Core branch:
Wchispace have been changed toANY_SPACE_9(this is not necessary but feels safe)configuration.nmlfilesfeign_configsin unit-testsgungho_model,lfric_atm,linear_modelandjedi_lfricapps use theWthetacoordinate spaceResults
The attached PDFs show plots from the gungho_model and lfric_atm test suites, indicating that the change to use a Wtheta-like coordinate space is science-neutral:
Some timing results are shown in the following table, showing changes to timing are within normal variability for this change (note that bigger savings are expected when comparing between
'Wchi'and'Wtheta'coordinate spaces forcoord_order=2)coord_space='Wchi'coord_space='Wtheta'Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - test_coord_space_apps/run27
Suite Information
Task Information
✅ succeeded tasks - 1511
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review